//
//  LYWBHomeViewController.swift
//  智微博
//
//  Created by mac1 on 2017/4/17.
//  Copyright © 2017年 Y&Q. All rights reserved.
//

import UIKit

class LYWBHomeViewController: LYWBBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
      

    }
  
  func showFriends() {
    print(#function)
    
    let vc = LYWBDemoViewController()
    
    //vc.hidesBottomBarWhenPushed = true
    
    // push的动作是 nav 做的
    
    navigationController?.pushViewController(vc, animated: true)
  }

  
}
// MARK: - 设置界面
extension LYWBHomeViewController {
  
  //重写父类方法
  override func setupUI() {
    super.setupUI()
    
    
    // 设置导航栏按钮
    // 无法实现高亮
    //navigationItem.leftBarButtonItem = UIBarButtonItem(title: "好友", style: .plain, target: self, action: #selector(showFriends))
    
    
    //swift 调用 OC 返回 instancetype 的方法,判断不出是否可选
//    let btn:UIButton = UIButton.cz_textButton("好友", fontSize: 16, normalColor: UIColor.darkGray, highlightedColor: UIColor.orange)
//    btn.addTarget(self, action: #selector(showFriends), for: .touchUpInside)
    
   // navigationItem.leftBarButtonItem = UIBarButtonItem(title: "好友", target: self, action: #selector(showFriends))
    navItem.leftBarButtonItem = UIBarButtonItem(title: "好友", target: self, action: #selector(showFriends))
    
    
  }
  
}
